{extend name="../application/public/base.html" /}
{block name="head"}
	<link rel="stylesheet" href="ADMIN_CUSTOM/css/list.css">
	<link rel="stylesheet" href="ADMIN_CUSTOM/css/btn.css">

{/block}
{block name="body"}
    <body>
        <div class="x-nav">
          <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="">演示</a>
            <a><cite>导航元素</cite></a>
          </span>
          <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
        </div>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
						<div class="layui-card-body">
	                        <form class="layui-form">
	                        	<div class="layui-card-body layui-col-space30">
	                        		{if condition="session('admin.admin_type') == 0"}
							     	<div class="layui-input-inline layui-show-xs-block">
										<label style="padding: 0 3px 0 0;">门店</label>
									 	<div class="layui-input-inline">
										  	<select name="shop_id" class="layui-select">
		                                        <option value="">所有门店</option>
		                                        {volist name="shop" id="v"}
		                                        <option value="{$v.shop_id}">{$v.shop_name}</option>
		                                        {/volist}
		                                   	</select>
									  	</div>
							     	</div>
							     	{/if}
	                                <div class="layui-input-inline layui-show-xs-block">
										<label style="padding: 0 3px 0 0;">订单类型</label>
									 	<div class="layui-input-inline">
										  	<select name="ty" class="layui-select">
		                                        <option value="">全部</option>
		                                        <option value="order">销售订单</option>
		                                        <option value="repair">维修订单</option>
		                                   	</select>
									  	</div>
							     	</div>
							     	<div class="layui-input-inline layui-show-xs-block">
										<label style="padding: 0 3px 0 0;">支付状态</label>
									 	<div class="layui-input-inline">
										  	<select name="state" class="layui-select">
		                                        <option value="">全部</option>
		                                        <option value="0">待支付</option>
		                                        <option value="1">已支付</option>
		                                   	</select>
									  	</div>
							     	</div>
	                            </div>
	                        	<div class="layui-card-body layui-col-space5">
							     	<div class="layui-input-inline layui-show-xs-block">
									 	<div class="layui-input-inline">
										  	<input type="text" id="start" placeholder="开始日" name="start" autocomplete="off" class="layui-input">
									  	</div>
									  	<div class="layui-input-inline">
										  	<input type="text" id="end" placeholder="结束日" name="end" autocomplete="off" class="layui-input">
									  	</div>
							     	</div>
							     	<div class="layui-input-inline layui-show-xs-block">
		                                <div class="layui-btn" lay-submit="" lay-filter="search">
		                                    <i class="layui-icon">&#xe615;</i></div>
		                            </div>
	                            </div>
	                        </form>
							<div class="layui-card-body layui-col-space5" id="count-box">
						     	
	                        </div>
                        </div>
						<div class="layui-card-body">

	                        <!-- 收入记账 start -->
	                        <div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  	<div class="layui-tab-content">
									<table class="layui-table layui-form" id="table-list">
									  	
									</table>
							  	</div>
							</div>
						  	<!-- 收入记账 end -->
							
						</div>
                    </div>
                </div>
            </div>
        </div> 
    </body>
{/block}
{block name="script"}
	<script type="text/javascript" src="ADMIN_CUSTOM/js/finance/income/index.js"></script>
    <script id="table-btn" type="text/html">
    	{{# if(d.o_ty == 1){ }}
        <div class="layui-btn" onclick="xadmin.open('订单详情','/user/order/details/ids/{{d.order_id}}')">详情</div>
    	{{# }else{ }}
    	<div class="layui-btn" onclick="xadmin.open('查看详情','/user/repair/repair_details/ids/{{d.order_id}}')">详情</div>
    	{{# } }}
    </script>
    <script id="count_box" type="text/html">
        <div class="green-border-btn">订单总额：{{d.total_moeny}}元</div>
     	<div class="green-border-btn">订单总成本：{{d.cost_money}}元</div>
     	<div class="green-border-btn">订单总收入：{{d.profit_moeny}}元</div>
     	<div class="green-border-btn">待支付总额：{{d.stay_moeny}}元</div>
    </script>
{/block}